package com.jkdz.spyke.rs
{
	import com.jkgh.remedy.core.client.*;
	import flash.utils.ByteArray;

	public class SpykePhoneRemoter implements RemedyRemoter
	{
		private var mo:SpykePhone;

		public function SpykePhoneRemoter(mo:SpykePhone)
		{
			this.mo = mo;
		}

		public function call(methodID:int, connection:RemedyClientServerConnection, onReturn:Function):void
		{
			switch (methodID)
			{
			}
		}

		public function run(methodID:int, connection:RemedyClientServerConnection):void
		{
			switch (methodID)
			{
				case 14:
					var a_14:String = (String)(RemedyStringClassManager.INSTANCE.readWithGraph(connection, new Vector.<Object>()));
					mo.setPersonName(a_14);
					break;
				case 15:
					var a_15:String = (String)(RemedyStringClassManager.INSTANCE.readWithGraph(connection, new Vector.<Object>()));
					mo.setPersonStatus(a_15);
					break;
				case 12:
					var a_12:SpykeAbstractCommunicatorListener = (SpykeAbstractCommunicatorListener)(RemedyMOClassManager.INSTANCE.readWithGraph(connection, new Vector.<Object>()));
					mo.registerListener(a_12);
					break;
				case 13:
					var a_13:SpykeAbstractCommunicatorListener = (SpykeAbstractCommunicatorListener)(RemedyMOClassManager.INSTANCE.readWithGraph(connection, new Vector.<Object>()));
					mo.registerOwner(a_13);
					break;
				case 67:
					mo.unPublish();
					break;
				case 66:
					mo.publish();
					break;
			}
		}
	}
}
